package com.maimao.api.mall.goods;

import com.maimao.core.model.resp.Result;
import com.maimao.model.common.StatusInput;
import com.maimao.model.dynamicform.DynamicForm;
import com.maimao.model.dynamicform.vo.SpecDynamicFormVo;
import com.maimao.model.goods.SpecDetails;
import com.maimao.model.goods.SpecGroup;
import com.maimao.model.goods.input.SpecDetailForm;
import com.maimao.model.goods.vo.SpecDetailVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;
import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2020/12/11 8:15 下午
 */
@Api(value = "商品规格接口")
@RequestMapping("/goods/spec/detail")
public interface SpecDetailApi {

    @ApiOperation("根据规格组查询细分规格")
    Result<?> selectDetailByGroupId(Integer groupId);

    @ApiOperation("修改规格")
    Result<?> updateSpecDetail(SpecDetailForm specDetailForm, BindingResult bindingResult);

    @ApiOperation("添加规格")
    Result<?> addSpecDetail(@Valid @RequestBody SpecDetailForm specDetailForm, BindingResult bindingResult);

    @ApiOperation("根据三级分类查询动态表单的规格")
    Result<?> loadDynamicForm(Integer categoryId);

    @ApiOperation("根据三级分类查询搜索规格")
    Result<?> findSearchSpecByCid(Integer categoryId);


    @ApiOperation("根据三级分类批量查询搜索规格")
    Result<?> findSearchSpecByCidBatch(@RequestBody List<Integer> categoryIdList);

}
